package cn.itsource.org.service;

import cn.itsource.org.domain.User;
import cn.itsource.org.query.UserQuery;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface UserService {
    /**
     * 根据id删除
     * @param id
     * @return
     */
    int deleteByPrimaryKey(Long id);

    /**
     * 新增
     * @param u
     * @return
     */
    void insert(User u);


    /**
     * 根据id查询
     * @param id
     * @return
     */
    User selectByPrimaryKey(Long id);

    /**
     * 修改
     * @param u
     * @return
     */
    void updateByPrimaryKeySelective(User u);



    /**
     * 分页
     * @return
     */
    PageInfo<User> pageInfo(UserQuery userQuery);


    void deleteAll(List<User> u);

    void delete(Long id);

    Boolean existsByUsername(User username);
}
